<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
  home页面
  <div class="title">
    欢迎回来
  </div>
  <ul class="list"></ul>
<script>
  fetch("/home/list").then(res => res.json())
    .then(res => {
      console.log(res)
      render(res)
    })
  function render(data) {
    let list = data.map(item => `<li>${item}</li>`)
    console.log(list.join(""))
    const oul = document.querySelector(".list")
    oul.innerHTML = list.join("")
  }
</script>
</body>
</html>